let sc:Character = "3"

switch sc{
    case "1":
    print(1)
    case "2":
    print(2)
    case "3":
    print(4)
default:
    print("no")
    
    
}

//元组匹配
let point = (1,0)

switch point{
case (0,0):"origin"
case(_,0):"x axis"
case(0,_):"y axis"
case(-3...3,-3...3):"on target"
default:"out target"
}

//值绑定
let poInt = (1,5)
switch poInt{
case(let x,0):"x axis is \(x)"
case let(x,y) where (x>0&&y>0):"\(x) and \(y)"
default:"no"
}

//falltrough 添加fall through之后效果很像就有的case
let pomInt = (1,5)
switch pomInt{
case(let x,0):
    "x axis is \(x)"
    fallthrough

default:"no"
}